package com.sg.dto.integration.framework;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc OrgPositionDto
 * @使用场景
 */
@Data
public class OrgPositionDto extends BaseDto implements Serializable {

    /**
     * 职务ID:
     */
    @ApiModelProperty("职务ID")
    private String positionId;

    /**
     * 冗余职务名称:
     */
    @ApiModelProperty("冗余职务名称")
    private String positionIdName;

    /**
     * 职务性质:
     */
    @ApiModelProperty(" 职务性质")
    private String positionType;

    /**
     * 职务级别ID:
     */
    @ApiModelProperty("职务级别ID")
    private String positionGradeId;

    /**
     * 职务级别名称:
     */
    @ApiModelProperty("职务级别名称")
    private String positionGradeName;

    /**
     * 岗位类型ID:
     */
    @ApiModelProperty("岗位类型ID")
    private String stationTypeId;

    /**
     * 岗位类型名称:
     */
    @ApiModelProperty("岗位类型名称")
    private String stationTypeName;

    /**
     * 关联岗位ID:
     */
    @ApiModelProperty("关联岗位ID")
    private String stationId;

    /**
     * 岗位名称:
     */
    @ApiModelProperty("岗位名称")
    private String stationName;

    /**
     * 职位ID:
     */
    @ApiModelProperty("职位ID")
    private String postId;

    /**
     * 职位名称:
     */
    @ApiModelProperty("职位名称")
    private String postName;

    /**
     * 职务职责概述:
     */
    @ApiModelProperty("职务职责概述")
    private String positionDutyDesc;

    /**
     * 职务目标概述:
     */
    @ApiModelProperty("职务目标概述")
    private String positionTargetDesc;

    /**
     * 关联职务名称ID:
     */
    @ApiModelProperty("关联职务名称ID")
    private String positionIdNameId;

    /**
     * 职务编号:
     */
    @ApiModelProperty("职务编号")
    private String positionNumber;

    /**
     * 职务类别字典ID:
     */
    @ApiModelProperty("职务类别字典ID")
    private String typeDictionaryId;

    /**
     * 是否可用于分管领导职务:
     */
    @ApiModelProperty("是否可用于分管领导职务")
    private String isOrgPosition;

    /**
     * 主体生命周期:
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;

    /**
     * 操作人就职记录ID:
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;

    /**
     * 操作时间:
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        OrgPositionDto that = (OrgPositionDto) o;
        return (
                positionId == that.positionId &&
                        positionIdName == that.positionIdName &&
                        positionType == that.positionType &&
                        positionGradeId == that.positionGradeId &&
                        positionGradeName == that.positionGradeName &&
                        stationTypeId == that.stationTypeId &&
                        stationTypeName == that.stationTypeName &&
                        stationId == that.stationId &&
                        stationName == that.stationName &&
                        postId == that.postId &&
                        postName == that.postName &&
                        positionDutyDesc == that.positionDutyDesc &&
                        positionTargetDesc == that.positionTargetDesc &&
                        positionIdNameId == that.positionIdNameId &&
                        positionNumber == that.positionNumber &&
                        typeDictionaryId == that.typeDictionaryId &&
                        isOrgPosition == that.isOrgPosition &&
                        subjectLifeCycle == that.subjectLifeCycle &&
                        operationInductionId == that.operationInductionId &&
                        operateTime == that.operateTime
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                positionId,
                positionIdName,
                positionType,
                positionGradeId,
                positionGradeName,
                stationTypeId,
                stationTypeName,
                stationId,
                stationName,
                postId,
                postName,
                positionDutyDesc,
                positionTargetDesc,
                positionIdNameId,
                positionNumber,
                typeDictionaryId,
                isOrgPosition,
                subjectLifeCycle,
                operationInductionId,
                operateTime
        );
    }

}
